﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Data;

namespace ResourceBlender_Express {
    /// <summary>
    /// A button which can be assigned an image and submenu
    /// </summary>
    public class SplitButton : Button {
        public static readonly DependencyProperty ButtonProperty = DependencyProperty.Register("Button", typeof(Button), typeof(SplitButton));
        /// <summary>
        /// Gets or sets the main button.
        /// </summary>
        /// <value>The main button.</value>
        public Button Button {
            get { return (Button)base.GetValue(ButtonProperty); }
            set { base.SetValue(ButtonProperty, value); }
        }

        public static readonly DependencyProperty MenuButtonProperty = DependencyProperty.Register("MenuButton", typeof(MenuButton), typeof(SplitButton));
        /// <summary>
        /// Gets or sets the menu button.
        /// </summary>
        /// <value>The menu button.</value>
        public MenuButton MenuButton {
            get { return (MenuButton)base.GetValue(MenuButtonProperty); }
            set { base.SetValue(MenuButtonProperty, value); }
        }

        public static readonly DependencyProperty MainButtonLocationProperty = DependencyProperty.Register("MainButtonLocation", typeof(PlacementMode), typeof(SplitButton));
        /// <summary>
        /// Gets or sets the position of the menu in relation to the main button.
        /// </summary>
        /// <value>The menu location.</value>
        public PlacementMode MainButtonLocation {
            get { return (PlacementMode)base.GetValue(MainButtonLocationProperty); }
            set { base.SetValue(MainButtonLocationProperty, value); }
        }
    }
}
